import math
def work(a, b=1.01):
    return a * b


def notwork(a):
    return a * 0.99


time = eval(input("输入计算时间"))
s = 1.0

for i in range(time):
    s = work(s)
print(s)

s1 = 1.0
for i in range(time):
    s = notwork(s1)
print(s1)

s2 = 1.0
for i in range(time):
    if 0 <= i % 7 < 5:
        s2 = work(s2)
    else:
        s2 = notwork(s2)
print(s2)

sum1 = 1;
j=1.0;

while(j<2.0):
    j+=0.000001
    s2 = 1.0
    for i in range(time):
        if 0 <= i % 7 < 5:
            s2 = work(s2,j)
        else:
            s2 = notwork(s2)
    if math.fabs(s2-s)<0.0001:
        break
print(j)
